package com.zhentao.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhentao.mapper.CdzGiftMapper;
import com.zhentao.mapper.UsersMapper;
import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.common.pojo.users.CdzGift;
import com.zhentao.service.ICdzGiftService;
import com.zhentao.userLocal.UserThreadLocalUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 奖品表 服务实现类
 * </p>
 *
 * @author mp
 * @since 2024-12-27
 */
@Service
public class CdzGiftServiceImpl extends ServiceImpl<CdzGiftMapper, CdzGift> implements ICdzGiftService {

    @Resource
    private CdzGiftMapper cdzGiftMapper;
    @Resource
    private UsersMapper usersMapper;
    @Override
    public ResponseResult selectWinn() {
        Long userId = UserThreadLocalUtil.getUser();
        List<CdzGift> list = cdzGiftMapper.selectWinn(userId);

        return ResponseResult.okResult(list);
    }
}
